<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .outer {
      width: 200px;
      height: 200px;
      border: 1px solid black;
      margin: 100px auto 0;
      position: relative;
    }
    .inner {
      width: 200px;
      height: 200px;
      background-color: red;
      /* transform: translateX(100px); */
      /* transform: translateY(100px); */
      /* transform: translateX(100px) translateY(100px); */
      /* transform: translate(100px, 0); */
      /* transform: translate(0, 100px); */
      /* transform: translate(100px, 100px); */
      /* translate: 100px; */
      /* translate: 0 100px; */
      translate: 100px 100px;
    }
    .inner2{
      width: 50px;
      height: 50px;
      background-color: aqua;
      position: absolute;
      left: 50%;
      top: 50%;
      translate: -50% -50%;
    }
  </style>
</head>
<body>
  <div class="outer">
    <div class="inner">hello world</div>
  </div>
  <div class="outer">
    <div class="inner2">hello world</div>
  </div>
</body>
</html>
